import React, { Component } from 'react'

export default class XzButton extends Component {
  state={
    count:0
  }
  doClick=()=>{
    let count=this.state.count+1
    this.setState({count})
  }
  render() {
    
    return (
      <div>
        <button onClick={this.doClick}>我被点击了{this.state.count}次</button>
      </div>
    )
  }
}
